<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="renderer" content="webkit"/>
    <meta name="screen-orientation" content="portrait"/>
    <meta name="x5-orientation" content="portrait"/>
    <title>扁平化的粥铺餐饮企业网站html模板案例列表页 - 模板之家 http://www.cssmoban.com</title>
    <base href="${pageContext.request.contextPath}/">
    <link rel="stylesheet" type="text/css" href="static/thirdly/business/css/style.css"/>
    <script src="static/thirdly/business/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <link href="static/thirdly/business/css/common.css" rel="stylesheet" type="text/css"/>
    <script src="static/thirdly/business/js/footer.js" type="text/javascript"></script>
</head>
<body>
<div class="casepage">
    <div class="w1240">
        <ul class="clearfix" id="food">
            <c:forEach items="${commoditylist}" var="commodity">
                <li>
                    <figure>
                        <img src="${commodity.comImg}"/>
                        <div>
                            <img src="${business.businessLogo}" class="img2"/>
                        </div>
                    </figure>
                    <figcaption>
                        <h2>
                            <b>${commodity.comName}</b>
                            <b>单价：<font>${commodity.comPrice}</font>元/份</b>
                            <a><i class='jian'></i></a>
                            <b class="num">数量：
                            <c:forEach items="${shopcommoditylist}" var="shopcommodity">
                                <c:if test="${commodity.comId==shopcommodity.comId}">
                                    <input type="number" class="coNumber" value="${shopcommodity.coNumber}">
                                </c:if>
                            </c:forEach>
                            </b>
                            <input type="hidden" class="comId" value="${commodity.comId}">
                            <b class="jia"></b></h2>
                    </figcaption>
                    <c:if test="${business!=null}">
                        <a href="${pageContext.request.contextPath}/thirdly/commoditydel.action?comId=${commodity.comId}">下架</a>
                    </c:if>
                </li>
            </c:forEach>
        </ul>
    </div>
</div>
<script src="static/thirdly/business/js/jquery-3.3.1.min.js"></script>
<script src="static/thirdly/business/js/SuperSlide.2.1.3.js"></script>
<script src="static/thirdly/business/js/more.js"></script>
<script>
    $(function () {
        $(".jia").click(function () {
            var num=$(this).siblings(".coNumber").val()*1;
            num++;
            console.log("adsdada")
            $(this).siblings(".coNumber").val(num);
            var comid=$(this).siblings(".comId").val();
            $.post("shopadd.action",{uId:${createUser.uId},businessId:${businessId},comId:comid});
        });
    });

</script>
</body>
</html>                                                                            
